﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="HeritageAcademy.Library.Controls.StatTableRow"
	x:Name="UserControl"
	UseLayoutRounding="True"
	d:DesignWidth="640" d:DesignHeight="480" Height="35" FocusVisualStyle="{x:Null}">

    <UserControl.Resources>
		<Storyboard x:Key="OnMouseEnter">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="brdMouseEnter">
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="OnMouseLeave">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="brdMouseEnter">
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
	<UserControl.Triggers>
		<EventTrigger RoutedEvent="Mouse.MouseEnter">
			<BeginStoryboard Storyboard="{StaticResource OnMouseEnter}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="Mouse.MouseLeave">
			<BeginStoryboard x:Name="OnMouseLeave_BeginStoryboard" Storyboard="{StaticResource OnMouseLeave}"/>
		</EventTrigger>
	</UserControl.Triggers>
	
	<Grid x:Name="LayoutRoot">
		<Border x:Name="brdMouseEnter" BorderThickness="0" Background="#19E96B00" Opacity="0"/>
		<Grid x:Name="grdHeader" Height="35" Margin="0" VerticalAlignment="Top">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="52"/>
				<ColumnDefinition Width="96"/>
				<ColumnDefinition Width="96"/>
				<ColumnDefinition/>
			</Grid.ColumnDefinitions>
			<Border BorderBrush="Black" BorderThickness="0,0,1,0" Margin="0"/>
			<Border BorderBrush="Black" BorderThickness="0,0,1,0" Margin="0" Grid.Column="1"/>
			<Border BorderBrush="Black" BorderThickness="0,0,1,0" Margin="0" Grid.Column="2"/>
			<Label x:Name="lblChapter" Content="0" d:LayoutOverrides="Width" HorizontalContentAlignment="Center" FontSize="18.667" Padding="5,0" VerticalContentAlignment="Center"/>
			<StackPanel x:Name="spQuestions" Grid.Column="1" Margin="0" Orientation="Horizontal" d:LayoutOverrides="Width" HorizontalAlignment="Center">
				<Label x:Name="lblQuestionsActual" Content="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="10.667" d:LayoutOverrides="GridBox" HorizontalAlignment="Center" VerticalAlignment="Bottom" Padding="5,5,2,0" Foreground="#FFEB7700" ToolTip="Количество правильных ответов" />
				<Label x:Name="lblQuestionsAll" Content="0" d:LayoutOverrides="Height" FontSize="18.667" Padding="0,0,5,0" VerticalContentAlignment="Center" ToolTip="Общее количество вопросов" />
			</StackPanel>
			<StackPanel x:Name="spTasks" Grid.Column="2" Margin="0" Orientation="Horizontal" d:LayoutOverrides="Width" HorizontalAlignment="Center">
				<Label x:Name="lblTasksActual" Content="0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="10.667" d:LayoutOverrides="GridBox" HorizontalAlignment="Center" VerticalAlignment="Bottom" Padding="5,5,2,0" Foreground="#FFEB7700" ToolTip="Количество выполненых задач" />
				<Label x:Name="lblTasksAll" Content="0" d:LayoutOverrides="Height" FontSize="18.667" Padding="0,0,5,0" VerticalContentAlignment="Center" ToolTip="Общее количество задач" />
			</StackPanel>
			<Label x:Name="lblSuccess" Content="45 %" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="13.333" Grid.Column="3"/>
			<Border x:Name="bdBarHolder" Background="#FFE5E4E4" BorderBrush="#FF606060" BorderThickness="1,1,1,1" 
				Height="20"  Grid.Column="3"  Grid.Row="0" VerticalAlignment="Center" CornerRadius="2" Margin="10,0" Padding="0,0,0,0" ToolTip="Степень освоения" SizeChanged="bdBarHolder_SizeChanged">
			<Border x:Name="bdBarPercent" Background="White" BorderBrush="Transparent" BorderThickness="0,0,0,0" HorizontalAlignment="Left" CornerRadius="2" Margin="0"/>
		</Border>
		</Grid>
	</Grid>
</UserControl>